package com.bum.api.processor.keeng.json;

import org.apache.commons.lang.StringUtils;

import com.bum.api.core.exp.om.Metas;
import com.bum.api.core.exp.om.Params;
import com.bum.api.core.service.process.ApiProcess;
import com.bum.api.processor.keeng.json.bo.KeengJsonBO;

public class KeengJsonProcess extends ApiProcess {
	KeengJsonBO	keengJsonBO;

	enum Func {
		streams
	}

	@Override
	public String process(String path, Params params, Metas metas) {
		String[] parts = StringUtils.split(path, "/", 3);

		Func func = null;
		if (parts.length > 2) {
			func = Func.valueOf(parts[1]);
			switch (func) {

				case streams:
					return keengJsonBO.streams(parts[2], params, metas);

				default:
					break;
			}
		}

		return null;
	}

	public void setKeengJsonBO(KeengJsonBO keengJsonBO) {
		this.keengJsonBO = keengJsonBO;
	}
}
